package fangwenzhe;

public class Busy implements Visitor {//忙人
    private String name;
    public Busy(String name) {
        this.name = name;
    }
    @Override
    public void visit(Music music) {
        System.out.println(name + "浏览音乐网站：" + music.getName());
        music.download();
    }
    @Override
    public void visit(Video video) {
        System.out.println(name + "浏览视频网站：" + video.getName());
        video.download();
    }
}
